<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>JSDoc: Source: components/vImg/vImg.vue</title>

    <script src="scripts/prettify/prettify.js"> </script>
    <script src="scripts/prettify/lang-css.js"> </script>
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>

<body>

<div id="main">

    <h1 class="page-title">Source: components/vImg/vImg.vue</h1>

    



    
    <section>
        <article>
            <pre class="prettyprint source linenums"><code>&lt;template>
  &lt;a :href="src" :data-fancybox="group" :data-caption="title" @click.prevent=''>
    &lt;img :src="thumb" :alt="title" @load="loaded"/>
    &lt;slot>&lt;/slot>
  &lt;/a>  
&lt;/template>  
  
&lt;script>  
/**
 * 图片编辑模块
 * @module components/vImg
 * @requires Cropper
 * @param {String} src 大图url
 * @param {String} thumb 缩略图url
 * @param {String} title 标题
 * @param {String} group=gallary 分组组名
 * @listens load 参数1为event
 * @example
 * &lt;v-img :src="src" :thumb="thumb" :title="title" @load="setImgSize">&lt;/v-img>
 *
 * slots:
 * default  默认在图片后
 */
export default {  
  name:"v-img",
  data () {  
    return {  
    }  
  },  
  props:{
    src:{
      'type':String,
      'default':'assets/images/img-error.png'
    },
    thumb:{
      'type':String,
      'default':'assets/images/img-error.png'
    },
    title:{
      'type':String,
      'default':''
    },
    group:{
      'type':String,
      'default':'gallary'
    }

  },
  mounted () {  
   require(['jquery'],function(jquery){
     window.$=window.jQuery=jquery
     require(['assets/libs/fancybox/jquery.fancybox.min.css','assets/libs/fancybox/jquery.fancybox.min.js'],function(){
       $.fancybox.defaults.hash = true;
     })
   })
  },
  methods:{
    loaded (e){
      this.$emit('load',e)
    }
  }
}  
&lt;/script>  
  
&lt;style>  

&lt;/style>  </code></pre>
        </article>
    </section>




</div>

<nav>
    <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-components_appCalendar.html">components/appCalendar</a></li><li><a href="module-components_appLoading.html">components/appLoading</a></li><li><a href="module-components_appUserBox.html">components/appUserBox</a></li><li><a href="module-components_editImage.html">components/editImage</a></li><li><a href="module-components_fileList.html">components/fileList</a></li><li><a href="module-components_menuNava_menuNava.html">components/menuNava/menuNava</a></li><li><a href="module-components_menuNava_menuNavaItem.html">components/menuNava/menuNavaItem</a></li><li><a href="module-components_myInputPage.html">components/myInputPage</a></li><li><a href="module-components_mySelectPage.html">components/mySelectPage</a></li><li><a href="module-components_myWebuploader.html">components/myWebuploader</a></li><li><a href="module-components_textImgBox.html">components/textImgBox</a></li><li><a href="module-components_timeline_timeline.html">components/timeline/timeline</a></li><li><a href="module-components_timeline_timelineItem.html">components/timeline/timelineItem</a></li><li><a href="module-components_vImg.html">components/vImg</a></li><li><a href="module-scripts_common.html">scripts/common</a></li><li><a href="module-scripts_configValid.html">scripts/configValid</a></li><li><a href="module-scripts_LunarCalendar.html">scripts/LunarCalendar</a></li><li><a href="module-scripts_vueMethods.html">scripts/vueMethods</a></li><li><a href="module-services.html">services</a></li><li><a href="module-services_AnniversaryService.html">services/AnniversaryService</a></li><li><a href="module-services_ArchiveService.html">services/ArchiveService</a></li><li><a href="module-services_BigEventService.html">services/BigEventService</a></li><li><a href="module-services_FamilyService.html">services/FamilyService</a></li><li><a href="module-services_UserService.html">services/UserService</a></li><li><a href="module-vuex-history.html">vuex-history</a></li><li><a href="module-vuex-loading.html">vuex-loading</a></li><li><a href="module-vuex-toast.html">vuex-toast</a></li></ul><h3>Namespaces</h3><ul><li><a href="Vue.html">Vue</a></li></ul>
</nav>

<br class="clear">

<footer>
    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Fri Jun 30 2017 09:20:36 GMT+0800 (中国标准时间)
</footer>

<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>
